[LINQ noob] Please help me convert this Python 3.x snippet to .net LINQ.

Posted by Hamish Grubijan on Stack Overflow See other posts from Stack Overflow or by Hamish Grubijan
Published on 2010-04-26T20:30:25Z Indexed on 2010/04/26 20:33 UTC
Read the original article Hit count: 226

Filed under:
|
|

I want to sort elements of a HashSet<string> and join them by a ; character.

Python interpreter version:

>>> st = {'jhg', 'uywer', 'nbcm', 'utr'}
>>> strng = ';'.join(sorted(s))
>>> strng
'ASD;anmbh;ashgg;jhghjg'

C# signature of a method I seek:

private string getVersionsSorted(HashSet<string> versions);

I can do this without using Linq, but I really want to learn it better.

Many thanks!

© Stack Overflow or respective owner

Related posts about python-3.x

Related posts about .net-3.5